import { createRouter } from "vue-router";
import { createWebHashHistory } from "vue-router";

//创建对应关系
const routers = createRouter(
    {
        history: createWebHashHistory(),
        routes: [
            {
                path: "/",
                redirect:"/home"
            },
            {
                path: '/home',
                component:()=>import("../views/home/home.vue")
            },
            {
                path: "/favor",
                component:()=>import("../views/favor/favor.vue")
            },
            {
                path: "/message",
                component:()=>import("../views/message/message.vue")
            },
            {
                path: "/profile",
                component:()=>import("../views/profile/profile.vue")
            },
            {
                path: "/city",
                component: () => import("../views/home/component/city.vue"),
                meta:
                {
                    hideTabBar: true
                }
            },
            {
                path: "/search",
                component: () => import("../views/search/Search.vue"),
                meta:
                {
                    hideTabBar: true
                }
            },
            {
                path: "/detail",
                component: () => import("../views/home/component/Detail.vue"),
                meta:
                {
                    hideTabBar: true
                }
            }
        ]
    }
)

export default routers